home *** CD-ROM | disk | FTP | other *** search
- function restartLevel()
- {
- _root.gotoAndPlay("level" + currentLevel);
- }
- function nextLevel()
- {
- _root.clock.stopClock();
- if(currentLevel < lastLevel)
- {
- _root.nextLevelWindow.showWindow();
- }
- else
- {
- _root.endWindow.showWindow();
- }
- }
- function gotoNextLevel()
- {
- stopAllSounds();
- _root.gotoAndPlay("level" + (currentLevel + 1));
- }
- function addGround(target)
- {
- grounds.push(target);
- }
- function addBarrier(target)
- {
- barriers.push(target);
- }
- function checkGrounds()
- {
- var _loc2_ = 0;
- while(_loc2_ < grounds.length)
- {
- if(grounds[_loc2_].hit.hitTest(_root.kopter._x,_root.kopter._y,true))
- {
- landingGround = grounds[_loc2_];
- landingGround.activate();
- return true;
- }
- _loc2_ = _loc2_ + 1;
- }
- return false;
- }
- function checkBarriers(myAlt)
- {
- var _loc2_ = 0;
- while(_loc2_ < barriers.length)
- {
- if(barriers[_loc2_].hit.hitTest(_root.kopter._x,_root.kopter._y,true) and barriers[_loc2_].alt >= myAlt)
- {
- return true;
- }
- _loc2_ = _loc2_ + 1;
- }
- return false;
- }
- extraAnim = true;
- lastLevel = 4;
-